﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.IO;
using System.Windows.Forms;
using System.Globalization;
using Microsoft.Practices.ComponentModel;
using Microsoft.Practices.RecipeFramework;
using Microsoft.Practices.RecipeFramework.Library;
using Microsoft.Practices.RecipeFramework.Services;
using Microsoft.Practices.RecipeFramework.VisualStudio;
using Microsoft.Practices.RecipeFramework.VisualStudio.Templates;
using EnvDTE;

namespace com.code.Actions
{
    [ServiceDependency(typeof(DTE))]
    class DefaultItemValues: Microsoft.Practices.RecipeFramework.Action
    {
        [Input(Required = true)]
        public string Project
        {
            get { return project; }
            set { project = value; }
        } string project;

        #region IAction Members
        IServiceProvider provider = null;
        IDictionaryService dictionaryService = null;

        public override void Execute()
        {

            DTE vs = GetService<DTE>(true);
            dictionaryService = GetService(typeof(IDictionaryService)) as IDictionaryService;
            DTE dte = GetService<DTE>(true);

            string ns = DteHelper.GetProjectNamespace((EnvDTE.Project) dictionaryService.GetValue("DALProject"));


            dictionaryService.SetValue("TargetDALNamespace", ns);
        }
              public override void Undo()
              {
              }
        }

        #endregion
    
    
    }

